package com.aplink.generic.constant.type;

public enum ControlType {

    BARCODE_SCANNER("BarcodeScanner"),
    BUTTON("Button"),
    CHECKBOX("CheckBox"),
    DATETIME_PICKER("DateTimePicker"),
    EDITTEXT("EditText"),
    GALLERY("Gallery"),
    GOOGLE_MAPS("GoogleMaps"),
    GRIDVIEW("GridView"),
    IMAGEVIEW("ImageView"),
    LISTVIEW("ListView"),
    POPUP_MENU("PopupMenu"),
    RADIO_BUTTON("RadioButton"),
    SPINNER("Spinner"),
    SWITCH("Switch"),
    TABHOST("TabHost"),
    TEXTVIEW("TextView"),
    VIEWPAGER("ViewPager");

    public static ControlType get(final String value) {
        for (final ControlType controlType : ControlType.values()) {
            if (controlType.mValue.equalsIgnoreCase(value)) {
                return controlType;
            }
        }
        return null;
    }

    private String mValue;

    private ControlType(final String value) {
        this.mValue = value;
    }

    public String getValue() {
        return this.mValue;
    }
}
